/**
 * @author [siwi]
 * @email [siwi@siwi.me]
 * @create date 2017-09-02 02:32:23
 * @modify date 2017-09-02 02:32:23
 * @desc [access token]
*/

const { mongoose, Schame } = require('./Mongoose')

const OauthAccessToken = new Schame({
    user_id: {
        type: String,
        required: true,
    },
    client_id: {
        type: String,
        required: true,
    },
    name: {
        type: String
    },
    access_token: {
        type: String
    },
    scopes: {
        type: String
    },
    revoked: {
        type: String,
        default: 0
    },
    expires_at: {
        type: Date
    }
})

module.exports = mongoose.model('OauthAccessToken', OauthAccessToken)